package com.voice.call.job;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import com.voice.call.entity.VosAccount;
import com.voice.call.service.VosService;

import voice.voice.call.cache.ConfigVosAccountCache;

@Component
public class VosTelephoneClear {

	private static final Logger log = LoggerFactory.getLogger(VosTelephoneClear.class);
	
	@Resource
	private VosService vosService;
	
	@Resource
	private ConfigVosAccountCache configVosAccountCache;
	
	public void execute() {
		
		log.info("vos清理无用话机定时任务开始...");
		VosAccount acct = configVosAccountCache.getDefaultVosAccount();
		vosService.clearUnTelephone(acct);
		log.info("vos清理无用话机定时任务结束...");
	}
}
